package me.goldze.mvvmhabit.binding.viewadapter.textview;

import android.widget.TextView;

import androidx.core.content.ContextCompat;
import androidx.databinding.BindingAdapter;


public class ViewAdapter {

    @BindingAdapter("textColor")
    public static void bindTextColor(TextView textView, int textColorResource) {
        textView.setTextColor(ContextCompat.getColor(textView.getContext(), textColorResource));
    }

    @BindingAdapter("textColorHint")
    public static void bindTextColorHint(TextView textView, int textColorResource) {
        textView.setHintTextColor(ContextCompat.getColor(textView.getContext(), textColorResource));
    }
}
